package com.fa4j.code.mate.model;

import com.fa4j.common.base.model.ModifyCmd;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
@Schema(description = "模型")
public class CodeMateModelModifyCmd extends ModifyCmd<Integer> {

    @Schema(description = "主键字段名")
    private Integer primaryFieldId;

    @Size(max = 64)
    @Pattern(regexp = CodeMateConstants.PATTERN_MODEL_NAME, message = "模型名称格式错误")
    @Schema(description = "模型名称")
    private String name;

    @Min(1)
    @Max(99)
    @Schema(description = "优先级")
    private Integer priority;

    @Size(max = 128)
    @Schema(description = "备注")
    private String remark;

    @Schema(description = "表名")
    private String tableName;

}
